package com.young4h.xinsuiwutuobang.bean.test;

public class HelloProxy implements Hello {
	private Hello hello;
	public HelloProxy() {
		hello = new HelloImpl();
	}
	@Override
	public void sayHello(String name) {
		before();
		hello.sayHello(name);
		after();
	}
	public void before(){
		System.out.println("before");
	}
	public void after(){
		System.out.println("after");
	}
	public static void main(String[] args) {
		Hello helloProxy = new HelloProxy();
		helloProxy.sayHello("xiaoming");
	}
}